home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group02b.txt
/
000140_icon-group-sender_Thu Nov 21 17:20:43 2002.msg
< prev
next >
Wrap
Internet Message Format
|
2003-01-02
|
2KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id gAM0KfY13144
for icon-group-addresses; Thu, 21 Nov 2002 17:20:41 -0700 (MST)
Message-Id: <200211220020.gAM0KfY13144@baskerville.CS.Arizona.EDU>
From: "jsampson-indexer" <jsampson@indexes.u-net.com>
To: "Steve Wampler" <swampler@noao.edu>, <icon-group@cs.arizona.edu>
Subject: RE: tab in regex
Date: Thu, 21 Nov 2002 21:23:21 -0000
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
Hello -
I am sure entering a tab char by pressing the tab key would work, but in
your example you are not entering it as user-input, i.e. at run time.
I was under the impression that in Perl regexps the usual style was "\t"
(see 'Programming Perl', 2nd Edn., p.64).
I am really not bothered because I can substitute another character before
presenting the input string to the library procedure.
The test program I am using is below (hoping the lines don't get
disrupted):-
############################################
#
# Testing Icon regular expressions
#
############################################
link regexp
procedure main()
write("Enter pattern (regexp)")
pattern := read()
pattern := map(pattern,"\xdd","\x7c") # vertical slash problem
write("Enter string in which pattern is to be found")
rope := read()
write("pattern is ",pattern)
write("string is ",rope)
RePat(pattern)
write("Match positions:")
every write(ReMatch(pattern,rope))
write("Find positions:")
every write(ReFind(pattern,rope))
end
Regards
_John Sampson_